package com.ww.springboot.boot.javabase.list;

import org.apache.commons.collections4.Bag;
import org.apache.commons.collections4.bag.HashBag;

/**
 * 描述：
 *
 * @author wanwei
 * @since 2021-07-21 17:18
 */
public class BagDemo {
    public static void main(String[] args) {
        Bag<Integer> bag = new HashBag();
        bag.add(1);
        bag.add(1);
        bag.add(2);
        bag.add(2);
        bag.add(1);
        System.out.println(bag.getCount(1));
        System.out.println(bag.getCount(2));

    }
}
